home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / librw / RWTPtrDeque.z / RWTPtrDeque
Encoding:
Text File  |  1998-10-30  |  28.1 KB  |  793 lines

  1.  
  2.  
  3.  
  4. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNaaaammmmeeee
  9.      RWTPtrDeque<T> - Rogue Wave library class
  10.  
  11. SSSSyyyynnnnooooppppssssiiiissss
  12.               #include <rw/tpdeque.h>
  13.           RWTPtrDeque<T> deq;
  14.  
  15.  
  16.  
  17. PPPPlllleeeeaaaasssseeee NNNNooootttteeee
  18.      RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee requires the Standard C++ Library.
  19.  
  20.  
  21. DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  22.      This class maintains a pointer-based collection of values, implemented as
  23.      a double-ended queue, or deque.  Class TTTT is the type pointed to by the
  24.      items in the collection.
  25.  
  26. PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
  27.      Isomorphic
  28.  
  29. EEEExxxxaaaammmmpppplllleeee
  30.      In this example, a double-ended queue of iiiinnnntttts is exercised.
  31.  
  32.               // tpdeque.cpp
  33.  
  34.  
  35.  
  36.               #include <rw/tpdeque.h>
  37.           #include <iostream.h>
  38.  
  39.  
  40.               /*
  41.  
  42.  
  43.  
  44.                * This program partitions integers into even and odd numbers
  45.            */
  46.  
  47.  
  48.               int main(){
  49.  
  50.  
  51.  
  52.                 RWTPtrDeque<int> numbers;
  53.  
  54.  
  55.  
  56.                 int n;
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74.                 cout << "Input an assortment of integers (EOF to end):"
  75.  
  76.  
  77.  
  78.                      << endl;
  79.  
  80.  
  81.  
  82.                 while (cin >> n) {
  83.  
  84.  
  85.  
  86.                   if (n % 2 == 0)
  87.                 numbers.pushFront(new int(n));
  88.               else
  89.                 numbers.pushBack(new int(n));
  90.             }
  91.  
  92.  
  93.                 while (numbers.entries()) {
  94.  
  95.  
  96.  
  97.                   cout << *numbers.first() << endl;
  98.               delete numbers.popFront();
  99.             }
  100.  
  101.  
  102.  
  103.                 return 0;
  104.  
  105.  
  106.  
  107.               }
  108.  
  109.  
  110.  
  111.               Program Input:
  112.  
  113.  
  114.  
  115.               1 2 3 4 5
  116.           <eof>
  117.  
  118.  
  119.               Program Output:
  120.  
  121.  
  122.  
  123.               4
  124.           2
  125.           1
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  137.  
  138.  
  139.  
  140.           3
  141.  
  142. RRRReeeellllaaaatttteeeedddd CCCCllllaaaasssssssseeeessss
  143.      5
  144.  
  145.  
  146.      Classes RRRRWWWWTTTTPPPPttttrrrrDDDDlllliiiisssstttt<<<<TTTT>>>>, RRRRWWWWTTTTPPPPttttrrrrSSSSlllliiiisssstttt<<<<TTTT>>>>,,,, and RRRRWWWWTTTTPPPPttttrrrrOOOOrrrrddddeeeerrrreeeeddddVVVVeeeeccccttttoooorrrr<<<<TTTT>>>> also
  147.      provide a Rogue Wave pointer-based interface to C++-standard sequence
  148.      collections.  Class ddddeeeeqqqquuuueeee<<<<TTTT****,,,, aaaallllllllooooccccaaaattttoooorrrr>>>> is the C++-standard collection
  149.      that serves as the underlying implementation for this class.
  150.  
  151. PPPPuuuubbbblllliiiicccc TTTTyyyyppppeeeeddddeeeeffffssss
  152.               typedef deque<T*, allocator>                   container_type;
  153.           typedef container_type::iterator               iterator;
  154.           typedef container_type::const_iterator         const_iterator;
  155.           typedef container_type::size_type              size_type;
  156.           typedef container_type::difference_type        difference_type;
  157.           typedef T*                                     value_type;
  158.           typedef T*&                                    reference;
  159.           typedef T* const&                              const_reference;
  160.  
  161.  
  162.  
  163. PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  164.               RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee<<<<TTTT>>>>();
  165.  
  166.  
  167.      Constructs an empty, double-ended queue.
  168.  
  169.               RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee<<<<TTTT>>>>(const deque<T*, allocator>& deq);
  170.  
  171.  
  172.      Constructs a double-ended queue by copying all elements of ddddeeeeqqqq.
  173.  
  174.               RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee<<<<TTTT>>>>(const RWTPtrDeque<T>& rwdeq);
  175.  
  176.  
  177.      Copy constructor.
  178.  
  179.               RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee<<<<TTTT>>>>(size_type n, T* a);
  180.  
  181.  
  182.      Constructs a double-ended queue with nnnn elements, each initialized to aaaa.
  183.  
  184.               RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee<<<<TTTT>>>>(T* const* first, T* const* last);
  185.  
  186.  
  187.      Constructs a double-ended queue by copying elements from the array of TTTT****s
  188.      pointed to by ffffiiiirrrrsssstttt, up to, but not including, the element pointed to by
  189.      llllaaaasssstttt.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr OOOOppppeeeerrrraaaattttoooorrrrssss
  211.               RWTPtrDeque<T>&
  212.           ooooppppeeeerrrraaaattttoooorrrr====(const RWTPtrDeque<T>& deq);
  213.  
  214.  
  215.      Clears all elements of self and replaces them by copying all elements of
  216.      ddddeeeeqqqq.
  217.  
  218.               RWTPtrDeque<T>&
  219.           ooooppppeeeerrrraaaattttoooorrrr====(const deque<T*, allocator>& stddeq);
  220.  
  221.  
  222.      Clears all elements of self and replaces them by copying all elements of
  223.      ssssttttddddddddeeeeqqqq.
  224.  
  225.               bool
  226.           ooooppppeeeerrrraaaattttoooorrrr<<<<(const RWTPtrDeque<T>& deq);
  227.  
  228.  
  229.      Returns ttttrrrruuuueeee if self compares lexicographically less than ddddeeeeqqqq, otherwise
  230.      returns ffffaaaallllsssseeee.  Items in each collection are dereferenced before being
  231.      compared.  Assumes that type TTTT has well-defined less-than semantics.
  232.  
  233.               bool
  234.           ooooppppeeeerrrraaaattttoooorrrr========(const RWTPtrDeque<T>& deq);
  235.  
  236.  
  237.      Returns ttttrrrruuuueeee if self compares equal to ddddeeeeqqqq, otherwise returns ffffaaaallllsssseeee.  Two
  238.      collections are equal if both have the same number of entries, and
  239.      iterating through both collections produces, in turn, individual elements
  240.      that compare equal to each other.  Elements are dereferenced before being
  241.      compared.
  242.  
  243.               reference
  244.           ooooppppeeeerrrraaaattttoooorrrr(((())))(size_type i);
  245.           const_reference
  246.           ooooppppeeeerrrraaaattttoooorrrr(((())))(size_type i) const;
  247.  
  248.  
  249.      Returns a reference to the iiiith element of self.  Index iiii should be
  250.      between 0000 and one less then the number of entries, otherwise the results
  251.      are undefined--nnnnoooo bbbboooouuuunnnnddddssss cccchhhheeeecccckkkkiiiinnnngggg iiiissss ppppeeeerrrrffffoooorrrrmmmmeeeedddd....
  252.  
  253.               reference
  254.           ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_type i);
  255.           const_reference
  256.           ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_type i) const;
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  269.  
  270.  
  271.  
  272.      Returns a reference to the iiiith element of self.  Index iiii must be between
  273.      0000 and one less then the number of entries in self,  otherwise the
  274.      function throws an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr.
  275.  
  276. PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
  277.               void
  278.           aaaappppppppeeeennnndddd(T* a);
  279.  
  280.  
  281.      Adds the item aaaa to the end of the collection.
  282.  
  283.               void
  284.           aaaappppppppllllyyyy(void (*fn)(T*,void*), void* d);
  285.           void
  286.           aaaappppppppllllyyyy(void (*fn)(const T*,void*), void* d) const;
  287.           void
  288.           aaaappppppppllllyyyy(void (*fn)(T*&,void*), void* d);
  289.  
  290.  
  291.  
  292.      Applies the user-defined function pointed to by ffffnnnn to every item in the
  293.      collection.  This function must have one of the prototypes:
  294.  
  295.                  void yourfun(T* a, void* d);
  296.  
  297.  
  298.  
  299.                  void yourfun(const T* a, void* d);
  300.              void yourfun(T*& a, void* d);
  301.  
  302.      for reference semantics.  Client data may be passed through parameter dddd.
  303.  
  304.               reference
  305.           aaaatttt(size_type i);
  306.           const_reference
  307.           aaaatttt(size_type i) const;
  308.  
  309.  
  310.      Returns a reference to the iiiith element of self.  Index iiii must be between
  311.      0000 and one less then the number of entries in self, otherwise the function
  312.      throws an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr.
  313.  
  314.               iterator
  315.           bbbbeeeeggggiiiinnnn();
  316.           const_iterator
  317.           bbbbeeeeggggiiiinnnn() const;
  318.  
  319.  
  320.      Returns an iterator positioned at the first element of self.
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  335.  
  336.  
  337.  
  338.               void
  339.           cccclllleeeeaaaarrrr();
  340.  
  341.  
  342.      Clears the collection by removing all items from self.
  343.  
  344.               void
  345.           cccclllleeeeaaaarrrrAAAAnnnnddddDDDDeeeessssttttrrrrooooyyyy();
  346.  
  347.  
  348.      Removes all items from the collection aaaannnndddd uses ooooppppeeeerrrraaaattttoooorrrr ddddeeeelllleeeetttteeee to destroy
  349.      the objects pointed to by those items.  Do not use this method if
  350.      multiple pointers to the same object are stored.
  351.  
  352.               bool
  353.           ccccoooonnnnttttaaaaiiiinnnnssss (const T* a) const;
  354.  
  355.  
  356.      If there exists an element tttt in self such that the expression ((((****tttt ======== ****aaaa))))
  357.      is true, returns ttttrrrruuuueeee. Otherwise, returns ffffaaaallllsssseeee.
  358.  
  359.               bool
  360.           ccccoooonnnnttttaaaaiiiinnnnssss (bool (*fn)(const T*, void*), void *d) const;
  361.           bool
  362.           ccccoooonnnnttttaaaaiiiinnnnssss(bool (*fn)(T*,void*), void* d) const;
  363.  
  364.  
  365.      Returns ttttrrrruuuueeee if there exists an element tttt in self such that the
  366.      expression ((((((((****ffffnnnn))))((((tttt,,,,dddd)))))))) is ttttrrrruuuueeee, otherwise returns ffffaaaallllsssseeee.  ffffnnnn points to a
  367.      user-defined tester function which must have one of the prototypes:
  368.  
  369.                  bool yourTester(T* a, void* d);
  370.  
  371.  
  372.  
  373.                  bool yourTester(const T* a, void *d)
  374.  
  375.      Client data may be passed through parameter dddd.
  376.  
  377.               iterator
  378.           eeeennnndddd();
  379.           const_iterator
  380.           eeeennnndddd() const;
  381.  
  382.  
  383.      Returns an iterator positioned "just past" the last element in self.
  384.  
  385.               size_type
  386.           eeeennnnttttrrrriiiieeeessss() const;
  387.  
  388.  
  389.      Returns the number of items in self.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  401.  
  402.  
  403.  
  404.               T*
  405.           ffffiiiinnnndddd(const T* a) const;
  406.  
  407.  
  408.      If there exists an element tttt in self such that the expression ((((****tttt ======== ****aaaa))))
  409.      is ttttrrrruuuueeee, returns tttt.  Otherwise, returns rrrrwwwwnnnniiiillll.
  410.  
  411.               T*
  412.           ffffiiiinnnndddd(bool (*fn)( T*,void*), void* d) const;
  413.           T*
  414.           ffffiiiinnnndddd(bool (*fn)(const T*,void*), void* d) const;
  415.  
  416.  
  417.      If there exists an element tttt in self such that the expression
  418.      ((((((((****ffffnnnn))))((((tttt,,,,dddd)))))))) is ttttrrrruuuueeee, returns tttt.  Otherwise, returns rrrrwwwwnnnniiiillll.  ffffnnnn points to
  419.      a user-defined tester function which must have one of the prototypes:
  420.  
  421.                  bool yourTester(T* a, void* d);
  422.  
  423.  
  424.  
  425.                  bool yourTester(const T* a, void* d);
  426.  
  427.      Client data may be passed through parameter dddd.
  428.  
  429.               reference
  430.           ffffiiiirrrrsssstttt();
  431.           const_reference
  432.           ffffiiiirrrrsssstttt() const;
  433.  
  434.  
  435.      Returns a reference to the first element of self.  If the collection is
  436.      empty, the function throws an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr.
  437.  
  438.               size_type
  439.           iiiinnnnddddeeeexxxx(const T* a) const;
  440.  
  441.  
  442.      Returns the position of the first item tttt in self such that ((((****tttt ======== ****aaaa)))), or
  443.      returns the static member nnnnppppoooossss if no such item exists.
  444.  
  445.               size_type
  446.           iiiinnnnddddeeeexxxx(bool (*fn)(T*,void*), void* d) const;
  447.           size_type
  448.           iiiinnnnddddeeeexxxx(bool (*fn)(const T*,void*), void* d) const;
  449.  
  450.  
  451.      Returns the position of the first item tttt in self such that((((((((****ffffnnnn))))((((tttt,,,,dddd)))))))) is
  452.      ttttrrrruuuueeee,,,, or returns the static member nnnnppppoooossss if no such item exists.  ffffnnnn
  453.      points to a user-defined tester function which must have one of the
  454.      prototypes:
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  467.  
  468.  
  469.  
  470.                  bool yourTester(T* a, void* d);
  471.  
  472.  
  473.  
  474.                  bool yourTester(const T* a, void* d);
  475.  
  476.      Client data may be passed through parameter dddd.
  477.  
  478.               bool
  479.           iiiinnnnsssseeeerrrrtttt(T* a);
  480.  
  481.  
  482.      Adds the item aaaa to the end of the collection.  Returns ttttrrrruuuueeee.
  483.  
  484.               void
  485.           iiiinnnnsssseeeerrrrttttAAAAtttt(size_type i, T* a);
  486.  
  487.  
  488.      Inserts the item aaaa in front of the item at position iiii in self.  This
  489.      position must be between zero and the number of entries in the
  490.      collection, otherwise the function throws an exception of type
  491.      RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr.
  492.  
  493.               bool
  494.           iiiissssEEEEmmmmppppttttyyyy() const;
  495.  
  496.  
  497.      Returns ttttrrrruuuueeee if there are no items in the collection, ffffaaaallllsssseeee otherwise.
  498.  
  499.               T*&
  500.           llllaaaasssstttt();
  501.           T* const &
  502.           llllaaaasssstttt() const;
  503.  
  504.  
  505.      Returns a reference to the last element of self.
  506.  
  507.               reference
  508.           mmmmaaaaxxxxEEEElllleeeemmmmeeeennnntttt();
  509.           const_reference
  510.           mmmmaaaaxxxxEEEElllleeeemmmmeeeennnntttt() const;
  511.           reference
  512.           mmmmiiiinnnnEEEElllleeeemmmmeeeennnntttt();
  513.           const_reference
  514.           mmmmiiiinnnnEEEElllleeeemmmmeeeennnntttt() const;
  515.  
  516.  
  517.      Returns a reference to the maximum or minimum element in self.
  518.  
  519.               size_type
  520.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(const T* a) const;
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  533.  
  534.  
  535.  
  536.      Returns the number of elements tttt in self such that the expression ((((****tttt ========
  537.      ****aaaa)))) is ttttrrrruuuueeee.
  538.  
  539.               size_type
  540.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(bool (*fn)(T*,void*), void* d) const;
  541.           size_type
  542.           ooooccccccccuuuurrrrrrrreeeennnncccceeeessssOOOOffff(bool (*fn)(const T*,void*), void* d) const;
  543.  
  544.  
  545.      Returns the number of elements tttt in self such that the
  546.      expression((((((((****ffffnnnn))))((((tttt,,,,dddd)))))))) is ttttrrrruuuueeee.  ffffnnnn points to a user-defined tester
  547.      function which must have one of the prototypes:
  548.  
  549.                  bool yourTester(T* a, void* d);
  550.  
  551.  
  552.  
  553.                  bool yourTester(const T* a, void* d);
  554.  
  555.      Client data may be passed through parameter dddd.
  556.  
  557.               T*
  558.           ppppooooppppBBBBaaaacccckkkk();
  559.  
  560.  
  561.      Removes and returns the last item in the collection.
  562.  
  563.               T*
  564.           ppppooooppppFFFFrrrroooonnnntttt();
  565.  
  566.  
  567.      Removes and returns the first item in the collection.
  568.  
  569.               void
  570.           pppprrrreeeeppppeeeennnndddd(T* a);
  571.  
  572.  
  573.      Adds the item aaaa to the beginning of the collection.
  574.  
  575.               void
  576.           ppppuuuusssshhhhBBBBaaaacccckkkk(T* a);
  577.  
  578.  
  579.      Adds the item aaaa to the end of the collection.
  580.  
  581.               void
  582.           ppppuuuusssshhhhFFFFrrrroooonnnntttt(T* a);
  583.  
  584.  
  585.      Adds the item aaaa to the beginning of the collection.
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  599.  
  600.  
  601.  
  602.               T*
  603.           rrrreeeemmmmoooovvvveeee(const T* a);
  604.  
  605.  
  606.      Removes and returns the first element tttt in self such that the expression
  607.      ((((****tttt ======== ****aaaa)))) is ttttrrrruuuueeee.  Returns rrrrwwwwnnnniiiillll if there is no such element.
  608.  
  609.               T*
  610.           rrrreeeemmmmoooovvvveeee(bool (*fn)(T*, void*), void* d);
  611.           T*
  612.           rrrreeeemmmmoooovvvveeee(bool (*fn)(const T*,void*), void* d);
  613.  
  614.  
  615.      Removes and returns the first element tttt in self such that the expression
  616.      ((((((((****ffffnnnn))))((((tttt,,,,dddd)))))))) is ttttrrrruuuueeee.  Returns rrrrwwwwnnnniiiillll if there is no such element.  ffffnnnn
  617.      points to a user-defined tester function which must have one of the
  618.      prototypes:
  619.  
  620.                  bool yourTester(T* a, void* d);
  621.  
  622.  
  623.  
  624.                  bool yourTester(const T* a, void* d);
  625.  
  626.      Client data may be passed through parameter dddd.
  627.  
  628.               size_type const T*
  629.           rrrreeeemmmmoooovvvveeeeAAAAllllllll(const_reference a);
  630.  
  631.  
  632.      Removes all elements tttt in self such that the expression ((((****tttt ======== ****aaaa)))) is
  633.      ttttrrrruuuueeee.  Returns the number of items removed.
  634.  
  635.               size_type
  636.           rrrreeeemmmmoooovvvveeeeAAAAllllllll(bool (*fn)(T*,void*), void* d);
  637.           size_type
  638.           rrrreeeemmmmoooovvvveeeeAAAAllllllll(bool (*fn)(const T*,void*), void* d);
  639.  
  640.  
  641.      Removes all elements tttt in self such that the expression ((((((((****ffffnnnn))))((((tttt,,,,dddd))))))))is
  642.      ttttrrrruuuueeee.  Returns the number of items removed.  ffffnnnn points to a user-defined
  643.      tester function which must have one of the prototypes:
  644.  
  645.                  bool yourTester(T* a, void* d);
  646.  
  647.  
  648.  
  649.                  bool yourTester(const T* a, void* d);
  650.  
  651.      Client data may be passed through parameter dddd.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  665.  
  666.  
  667.  
  668.               T*
  669.           rrrreeeemmmmoooovvvveeeeAAAAtttt(size_type i);
  670.  
  671.  
  672.      Removes and returns the item at position iiii in self.  This position must
  673.      be between zero and one less then the number of entries in the
  674.      collection, otherwise the function throws an exception of type
  675.      RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr.
  676.  
  677.               T*
  678.           rrrreeeemmmmoooovvvveeeeFFFFiiiirrrrsssstttt();
  679.  
  680.  
  681.      Removes and returns the first item in the collection.
  682.  
  683.               T*
  684.           rrrreeeemmmmoooovvvveeeeLLLLaaaasssstttt();
  685.  
  686.  
  687.      Removes and returns the first item in the collection.
  688.  
  689.               size_type
  690.           rrrreeeeppppllllaaaacccceeeeAAAAllllllll(const T* oldVal, T* newVal);
  691.  
  692.  
  693.      Replaces with nnnneeeewwwwVVVVaaaallll all elements tttt in self such that the expression ((((****tttt
  694.      ======== ****oooollllddddVVVVaaaallll)))) is ttttrrrruuuueeee.  Returns the number of items replaced.
  695.  
  696.               size_type
  697.           rrrreeeeppppllllaaaacccceeeeAAAAllllllll(bool (*fn)(T*, void*), void* x, T* newVal);
  698.           size_type
  699.           rrrreeeeppppllllaaaacccceeeeAAAAllllllll(bool (*fn)(const T*, void*), void* x,
  700.                      const T* newVal);
  701.  
  702.  
  703.      Replaces with nnnneeeewwwwVVVVaaaallll all elements tttt in self such that the expression
  704.      ((((((((****ffffnnnn))))((((tttt,,,,dddd))))))))is ttttrrrruuuueeee.  Returns the number of items replaced.  ffffnnnn points to
  705.      a user-defined tester function which must have one of the prototypes:
  706.  
  707.                  bool yourTester(T* a, void* d);
  708.  
  709.  
  710.  
  711.                  bool yourTester(const T* a, void* d);
  712.  
  713.      Client data may be passed through parameter dddd.
  714.  
  715.               void
  716.           ssssoooorrrrtttt();
  717.  
  718.  
  719.      Sorts the collection using the less-than operator to compare elements.
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))                                            RRRRWWWWTTTTPPPPttttrrrrDDDDeeeeqqqquuuueeee((((3333CCCC++++++++))))
  731.  
  732.  
  733.  
  734.      Elements are dereferenced before being compared.
  735.  
  736.               deque<T*, allocator>&
  737.           ssssttttdddd();
  738.           const deque<T*, allocator>&
  739.           ssssttttdddd() const;
  740.  
  741.  
  742.      Returns a reference to the underlying C++-standard collection that serves
  743.      as the implementation for self.
  744.  
  745. SSSSttttaaaattttiiiicccc PPPPuuuubbbblllliiiicccc DDDDaaaattttaaaa MMMMeeeemmmmbbbbeeeerrrr
  746.               size_type  nnnnppppoooossss;
  747.  
  748.  
  749.      This is the value returned by member functions such as iiiinnnnddddeeeexxxx to indicate
  750.      a non-position.  The value is equal to ~~~~((((ssssiiiizzzzeeee____ttttyyyyppppeeee))))0000.
  751.  
  752. RRRReeeellllaaaatttteeeedddd GGGGlllloooobbbbaaaallll OOOOppppeeeerrrraaaattttoooorrrrssss
  753.               RWvostream&
  754.           ooooppppeeeerrrraaaattttoooorrrr<<<<<<<<(RWvostream& strm, const RWTPtrDeque<T>& coll);
  755.           RWFile&
  756.           ooooppppeeeerrrraaaattttoooorrrr<<<<<<<<(RWFile& strm, const RWTPtrDeque<T>& coll);
  757.  
  758.  
  759.      Saves the collection ccccoooollllllll onto the output stream ssssttttrrrrmmmm, or a reference to
  760.      it if it has already been saved.
  761.  
  762.               RWvistream&
  763.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWvistream& strm, RWTPtrDeque<T>& coll);
  764.           RWFile&
  765.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWFile& strm, RWTPtrDeque<T>& coll);
  766.  
  767.  
  768.      Restores the contents of the collection ccccoooollllllll from the input stream ssssttttrrrrmmmm.
  769.  
  770.               RWvistream&
  771.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWvistream& strm, RWTPtrDeque<T>*& p);
  772.           RWFile&
  773.           ooooppppeeeerrrraaaattttoooorrrr>>>>>>>>(RWFile& strm, RWTPtrDeque<T>*& p);
  774.  
  775.  
  776.      Looks at the next object on the input stream ssssttttrrrrmmmm and either creates a
  777.      new collection off the heap and sets pppp to point to it, or sets pppp to point
  778.      to a previously read instance.  If a collection is created off the heap,
  779.      then you are responsible for deleting it.
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.                                                                        PPPPaaaaggggeeee 11112222
  790.  
  791.  
  792.  
  793.